package com.foreknow.tijian.service.Impl;

import com.foreknow.tijian.dao.Impl.OverallResultDaoImpl;
import com.foreknow.tijian.dao.OverallResultDao;
import com.foreknow.tijian.po.OverallResult;
import com.foreknow.tijian.service.OverallResultService;
import com.foreknow.tijian.util.DBUtil;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class OverallResultServiceImpl implements OverallResultService {
    //建立连接
    Connection conn= DBUtil.getConnection();
    PreparedStatement pst;
    @Override
    public List<OverallResult> listOverallResultByOrderId(OverallResult result) {
        OverallResultDao overallResultDao = new OverallResultDaoImpl();
        List<OverallResult> list=new ArrayList<>();
        try{
            list=overallResultDao.listOverallResultByOrderId(result);
        }
        catch(Exception e){
        }
        finally {
            //关闭资源
            DBUtil.close(pst);
        }
        return list;
    }
}
